<?php @session_start(); 
//echo 'in';exit;
?>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="keywords" content="">
        <meta name="author" content="">
        <title>Product</title>
        <?php fnGetMeta(); ?>
        <link rel="stylesheet" type="text/css" href="<?php echo TEMPLATE; ?>css/payment.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo TEMPLATE; ?>css/custom_product.css" />
		<script src="<?php echo URL.VIEW?>js/product_detail.js"></script>	
        </head>
    <body class="activateAppearAnimation header3" style="padding-top:0px;">
        <!-- Primary Page Layout 
                ================================================== --> 
        <!-- globalWrapper -->
        <div id="globalWrapper" class="localscroll">
            <?php fnGetHeader(); ?>
              <section class="inner_banner">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-6">
                           
                            <ul id="navTrail">
                                <li><a href="<?php echo SITEURL;?>">Home</a></li>
                                <li id="navTrailLast">Product Detail</li>
                            </ul>
                        </div>
                        <div class="col-sm-6 hidden-xs"></div>
                    </div>
                </div>
            </section>
            <section class="titles">
    <div class="container">
      <h2><span>Get 24/7 Trusted PC Solution</span> Online from Trained Tech Experts through Secure Remote Access at TechOak</h2>
    </div>
  </section>
   <section>
  <div class="container">
    <div class="row">
      <div class="col-lg-3 mt15 ">
      
      	<div class="product-lists-links clearfix">
        	<h3>Category List</h3>
            <ul class="product-list-ul clearfix">
            	<?php foreach($this->category as $key =>$value):?>
                <li <?php if($this->category_name == $value['cat_alias']): echo 'class=selected_category';endif;?>><a href="<?php echo URL."product/".$value['cat_alias'];?>"><?php echo ucfirst($value['cat_name']);?></a></li>
                <?php endforeach;?>
            </ul>
        
        </div><!--product-lists-links -->
       
      </div>
        <?php  $prd_value = $this->productArray;?>
                
      <div class="col-lg-9 mt15 proudct-page">
        
         <div class="innerpage">
         
         	<div class="product-detail-container">
                    <?php 
                       /* echo '<pre>';
                        print_R($_SESSION['shoping_cart']);
                        exit;*/
                     ?>
                    <h3><?php echo ucfirst($prd_value['prd_name']);?></h3>
                    <?php if($this->ErrorMessage !=""):?>
                    <div id="msg" class="alert alert-danger" style="opacity: 0.846072;">
                        <button data-dismiss="alert" class="close" type="button">×</button>
                        <i class="fa fa-ok-sign"></i> <?php echo $this->ErrorMessage;?>
                    </div>
                    <?php endif;?><?php if($this->successMessage !=""):?>
                    <div id="msg" class="alert alert-success" style="opacity: 0.846072;">
                        <button data-dismiss="alert" class="close" type="button">×</button>
                        <i class="fa fa-ok-sign"></i> <?php echo $this->successMessage;?>
                    </div>
                    <?php endif;?>
                     
                <?php
               if ($prd_value['prd_image'] != ""):
                    if (file_exists("admin/" . $prd_value['prd_image'])):
                        $src = URL . "admin/" . $prd_value['prd_image'];
                    else:
                        $src = URL . "img/images/default-product-image.jpg";
                    endif;

                else:
                    $src = URL . "img/images/default-product-image.jpg";
                endif;
                ?>
                <div class="product-detail-box clearfix">
                
                	<div class="col-lg-5 mt15">
                    	<div class="img"><img src="<?php echo $src;?>" height="300" width="300" alt=""></div>
                    </div>
                    <div class="col-lg-7 mt15">
                    
                    	<div class="product-detail-data">
                        	<h4><?php echo ucfirst($prd_value['prd_name']);?></h4>
                                
                                <p class="price">$<?php echo number_format($prd_value['prd_price'],2);?></p>
                            
                            <form method="post">
                            <div class="product-fields-wrapper clearfix">
                            	<div class="product-fields-group clearfix">
                                	<div class="qty clearfix changer">
                                        	<label>Quantity:</label>
                                            <div class="value-changer quantity-container">
                                                <a class="increase quantity_plus" href="#">+</a>
												
												
												<?php 
													$quantity = $this->quantity_numb;
													
													if (array_key_exists('shoping_cart', $_SESSION)) {
														$cart = $_SESSION['shoping_cart'];
                                                                                                                if(count($cart) > 0){
														foreach($cart as $_cart) {
															if ($_cart['prd_id'] ==  $prd_value['prd_id']) {
																if ($_cart['prd_qty'] > 1) {
																	$quantity = $_cart['prd_qty'];
																}
															}
														}
                                                                                                                }
													}
													
												?>
												
												
                                                <input type="text" value="1" 
												name="quantity" readonly="readonly" class="amount-input quantity" size="5">
                                                <a class="decrease quantity_minus" href="#">−</a>
                                           	</div>
                                   </div>
                              </div>
                          	</div>
                            
                            
                                <input type="hidden" name="product_id" id="product_id" value="<?php echo $prd_value['prd_id'];?>" />
                            <div class="addtocart">
                                <a href="javascript:void(0)" class="addtocart-link">
                                    <input type="submit" name="add_cart" class="add_cart_btn" value="ADD TO CART">
                                </a>
                            </div>
                            </form>
                        </div>
                    	
                    </div>
                	
                </div><!-- end of product-detail-box -->
                
                <div class="product-desc-div">
                	<div class="product-desc-top">
                    	<span>Description</span>
                    </div>
                    <div class="product-desc-bottom">
                    	<?php echo stripslashes($prd_value['prd_description']);?>
                        
                    </div>
                    
                </div><!-- end of product-desc-div -->
            </div><!-- end of product-detail-container -->
         
          
        </div>
        
      </div>
   
    </div>
  </div>
</div>
</section>

        
        <div id="contentBk" class="clearfix">
           <?php fnGetHmFooter(); ?>
    </body>
</html>